import moment from 'moment'
const lock_field = {
    "addDisplay": false,
    "addDisabled": false,
    "editDisplay": false,
    "editDisabled": true,
    "showColumn": false,
};
export const tableOption = {
    "border": true,
    "index": true,
    "indexLabel": "序号",
    "stripe": true,
    "menuAlign": "center",
    "align": "center",
    "searchMenuSpan": 6,
    "column": [{
        ...lock_field,
        "type": "input",
        "label": "编号",
        "prop": "jingsaiId"
    }, {
        ...lock_field,
        "type": "input",
        "label": "学籍号",
        "prop": "jingsaiStudent"
    }, {
        ...lock_field,
        "type": "input",
        "label": "学期编号",
        "prop": "jingsaiTerm"
    }, {
        "type": "daterange",
        "label": "时间",
        "prop": "jingsaiDate",
        "format": "yyyy-MM-dd",
        "valueFormat": "yyyy-MM-dd 00:00:00",
        "value": [moment().format('YYYY-MM-DD 00:00:00'), moment().format('YYYY-MM-DD 00:00:00')],
        formatter: (row, value, label, column) => { return value.join(' 至 ').replace(/00:00:00/g, '') },
        rules: [{ required: true, message: "必填内容，不能为空", trigger: "blur" }],
    }, {
        "type": "input",
        "label": "比赛名称",
        "prop": "jingsaiRace",
        "placeholder": "如: 第01届 雅典奥运会",
        rules: [{ required: true, message: "必填内容，不能为空", trigger: "blur" }],
    }, {
        "type": "radio",
        "label": "级别",
        "prop": "jingsaiLevel",
        button: true,
        dicData: dict.szpj_level,
        value: '10',
        rules: [{ required: true, message: "必填内容，不能为空", trigger: "blur" }],
    }, {
        "type": "input",
        "label": "项目",
        "prop": "jingsaiTitle",
        "placeholder": "如: 田径,体操,游泳",
        rules: [{ required: true, message: "必填内容，不能为空", trigger: "blur" }],
    }, {
        "type": "input",
        "label": "获奖情况",
        "prop": "jingsaiAwards",
        "placeholder": "如: 冠军,团体第一名,一等奖",
        rules: [{ required: true, message: "必填内容，不能为空", trigger: "blur" }],
    }, {
        "type": "input",
        "label": "主办单位",
        "prop": "jingsaiSponsor",
        "placeholder": "如: 希腊雅典市",
        rules: [{ required: true, message: "必填内容，不能为空", trigger: "blur" }],
    }, {
        ...lock_field,
        "type": "input",
        "label": "创建人",
        "prop": "jingsaiCreateUser"
    }, {
        ...lock_field,
        "type": "input",
        "label": "",
        "prop": "jingsaiCreateTime"
    }, {
        ...lock_field,
        "type": "input",
        "label": "审核人",
        "prop": "jingsaiApproveUser"
    }, {
        ...lock_field,
        "type": "input",
        "label": "",
        "prop": "jingsaiApproveTime"
    }],
    group: [{
        label: "附件",
        column: [{
            "type": "upload",
            "label": "附件",
            "prop": "attachment",
            "action": "/szpj/file/zp_jing_sai/upload",
            "multiple": true,
            rules: [{ required: true, message: "必填内容，不能为空", trigger: "blur" }],
        }],
    }],

}